package com.twt.Dao;

import com.twt.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper //标记mapper文件位置，否则在Application.class启动类上配置mapper包扫描
@Repository
public interface MyLakeDao {

    void setHead(@Param("username") String username, @Param("head") String head);//存自定义头像

    User getUser(@Param("username") String username);

    void changePassword(@Param("username") String username, @Param("password") String password);

    void changeNicknameInUser(@Param("username") String username, @Param("nickname") String nickname);

    void changeNicknameInThrowed(@Param("username") String username, @Param("nickname") String nickname);

    void changeNicknameInPicked(@Param("username") String username, @Param("nickname") String nickname);

    void changeNicknameInLake(@Param("username")String username,@Param("nickname") String nickname);

    void setUserNonexistentInThrowed(@Param("username") String username);

    void setUserNonexistentInPicked(@Param("username") String username);

    void deleteLakeWhoNonexistent(@Param("username") String username);

    void deleteUserWhoNonexistent(@Param("username") String username);

    User findNickname(@Param("nickname") String nickname);

}
